package com.aioz.security.controller;


import com.aioz.security.common.ResponseResult;
import com.aioz.security.service.impl.CategoryServiceImpl;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author Aioz
 * @since 2022-10-03
 */
@RestController
@RequestMapping("/category")
public class CategoryController {

    @Resource
    private CategoryServiceImpl categoryService;

    //获取全部类型
    @GetMapping("/get/all")
    public ResponseResult getAllCategories(){
        return new ResponseResult<>(200,categoryService.list());
    }
}
